﻿using System;
using System.Data;
using System.Collections.Generic;
using Maticsoft.Common;
using Hyfw.Model;
using System.Collections;
using System.Data.SqlClient;

namespace Hyfw.BLL
{
  public   class CommonManager
    {
        private readonly Hyfw.DAL.CommonService dal = new DAL.CommonService();
        
        /// <summary>
        /// 执行分页存储过程
        /// </summary>
        /// <param name="key">搜索关键字</param>
        /// <param name="pageIndex">第几页</param>
        /// <param name="pageSize">页显示数量</param>
        /// <param name="sortFiled">排序字段</param>
        /// <param name="sortOrder">排序规则，降序，还是升序</param>
        /// <param name="prodceureName">存储过程名称</param>
        /// <returns>hashtable data=数据 total=总记录数</returns>
        public Hashtable Serach(string key, int pageIndex, int pageSize, string sortFiled, string sortOrder,string prodceureName)
        {
            return dal.Serach(key, pageIndex, pageSize, sortFiled, sortOrder,prodceureName);
        }

        public ArrayList GeListByProcedureName(string procedureName)
        {
            return dal.GeListByProcedureName(procedureName);
        }

        public ArrayList GetListByProcedureNameAndParms(string procedureName, SqlParameter[] param)
        {
            return dal.GeListByProcedureName(procedureName, param);
        }
      
    }
}
